class MyVue {
  constructor(options) {
    this.$options = options;

    this.$data = options.data;

    observe(options.data);

    proxy(this);

    // 编译node
    new Compile(this,options.el)

  }
}

function proxy(vm) {
  Object.keys(vm.$data).forEach((key) => {
    Object.defineProperty(vm, key, {
      get() {
        return vm.$data[key];
      },
      set(val) {
        vm.$data[key] = val;
      },
    });
  });
}
